import axios from './axios';
import {toast,messagebox} from 'mint-ui';
import qs from 'Qs';

let BASE_URL = process.env.API_HOST;
// 获取微信appid
export const getWeixinAppid = data=>{
    return axios.get(BASE_URL+'/login/getWeixinAppid',{params:data});
}
// 获取授权 有code
export const codeLogin = data=>{
    return axios.get(BASE_URL+'/login/login',{params:data});
}
// 获取短信
export const sendMsg = data=>{
    return axios.post(BASE_URL+'/login/sendMsg',qs.stringify(data));
}
// 验证是否老会员
export const verifyMobile = data=>{
    return axios.post(BASE_URL+'/login/verifyMobile',qs.stringify(data));
}
// 绑定用户接口
export const bindTel = data=>{
    return axios.post(BASE_URL+'/login/bindTel',qs.stringify(data));
}
// 请求首页广告图
export const indexBanner = (data) => {
    return axios.get(BASE_URL+'/advertisement/ad_list',{params:data});
}
// 请求首页nav菜单
export const navigation = (data) => {
    return axios.get(BASE_URL+'/Home/navigation',{params:data});
}
// 请求首页拼团列表
export const indexSpelling = (data) => {
    return axios.get(BASE_URL+'/spelling/index',{params:data});
}
// 请求金牌美容师列表
export const doctorlist = (data) => {
    return axios.get(BASE_URL+'/doctor/doctor_list',{params:data});
}
// 请求金牌美容师详情
export const doctorDetail = (data) => {
    return axios.get(BASE_URL+'/doctor/doctor_detail',{params:data});
}
// 请求项目列表
export const indexproject = (data) => {
    return axios.get(BASE_URL+'/Project/indexproject_list',{params:data});
}
// 请求产品列表
export const getGoodslist = (data) => {
    return axios.get(BASE_URL+'/goods/goods_list',{params:data});
}
// 获取商品详情
export const getGoodDetail = (data,url) => {
    return axios.get(BASE_URL+url,{params:data});
}
// 获取商品评价列表
export const getGoodEvaluate = (data) => {
    return axios.get(BASE_URL+'/order/evaluation_list',{params:data});
}
// 获取项目包含卡项
export const getProjecthasCard = (data) => {
    return axios.get(BASE_URL+'/project/project_has_card',{params:data});
}
// 获取项目包含卡项中包含的项目
export const getCardthasProjec = (data) => {
    return axios.get(BASE_URL+'/project/card_has_project',{params:data});
}
// 加入购物车
export const addCard = (data) => {
    return axios.post(BASE_URL+'/Shopping_Cart/add_card',qs.stringify(data));
}
// buydata获取项目详情
export const submitOrderDetail = (data) => {
    return axios.get(BASE_URL+'/Order/submit_order_detail',{params:data});
}
// 获取门店数据
export const getShopList = (data) => {
    return axios.get(BASE_URL+'/Appointment/get_shop_list',{params:data});
}
// 获取默认地址
export const addressListOne = (data) => {
    return axios.get(BASE_URL+'/Goods/addressListOne',{params:data});
}
// 微信支付
export const wxPay = (data) => {
    return axios.post(BASE_URL+'/Wxpay/pay',qs.stringify(data));
}
// 获取购物车列表
export const cartList = (data) => {
    return axios.get(BASE_URL+'/Shopping_Cart/card_list',{params:data});
}
// 删除购物车
export const deleteCart = (data) => {
    return axios.get(BASE_URL+'/Shopping_Cart/delete_cart',{params:data});
}
// 获取项目类别
export const projectKindList = (data) => {
    return axios.get(BASE_URL+'/project/project_kind_list',{params:data});
}
// 获取项目对应类别的列表
export const projectListByKind = (data) => {
    return axios.get(BASE_URL+'/project/Project_list_by_kind',{params:data});
}
// 获取产品类别
export const goodsKindList = (data) => {
    return axios.get(BASE_URL+'/Goods/Goods_kind_list',{params:data});
}
// 获取产品对应类别的列表
export const goodsListByKind = (data) => {
    return axios.get(BASE_URL+'/Goods/Goods_list_by_kind',{params:data});
}
// 获取卡项类别
export const cardKindList = (data) => {
    return axios.get(BASE_URL+'/card/card_kind_list',{params:data});
}
// 获取卡项对应类别的列表
export const cardListByKind = (data) => {
    return axios.get(BASE_URL+'/card/card_list_by_kind',{params:data});
}
// 获取提现规则
export const getWithdrawRule = (data) => {
  return axios.get(BASE_URL + '/Customers/Withdraw_Rules', {
    params: data
  });
}
// 朋友圈列表
export const friendsCircle = (data) => {
    return axios.get(BASE_URL + '/Friends_Circle/video_list', {
      params: data
    });
  }
// 假支付
export const payOrder = (data) => {
    return axios.post(BASE_URL + '/Order/pay_order', qs.stringify(data));
  }